-
Notifications
You must be signed in to change notification settings - Fork 354
Fix compile errors with gcc 14 #1176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Fixes build error seen with gcc 14.3.0:
ptp2/chdk.c: In function 'yuv_live_to_jpeg':
ptp2/chdk.c:1182:41: error: passing argument 3 of 'jpeg_mem_dest' from incompatible pointer type [-Wincompatible-pointer-types]
1182 | jpeg_mem_dest (&cinfo, &outbuf, &outlen);
| ^~~~~~~
| |
| long unsigned int *
In file included from ptp2/chdk.c:32:
/home/autobuild/autobuild/instance-4/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/jpeglib.h:979:28: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
979 | EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
…_decompress.c
Seen with gcc 14.3.0:
jl2005c/jl2005bcd_decompress.c: In function 'jl2005bcd_decompress':
jl2005c/jl2005bcd_decompress.c:161:46: error: passing argument 3 of 'jpeg_mem_dest' from incompatible pointer type [-Wincompatible-pointer-types]
161 | jpeg_mem_dest (&cinfo, &jpeg_header, &jpeg_header_size);
| ^~~~~~~~~~~~~~~~~
| |
| long unsigned int *
In file included from jl2005c/jpeg_memsrcdest.h:4,
from jl2005c/jl2005bcd_decompress.c:39:
/home/autobuild/autobuild/instance-4/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/jpeglib.h:979:28: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
979 | EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
|
The compilation error @bkuhls is referring to happened on the Buildroot auto-builders, while compiling for Linux with uClibc for mips64el: As shown by this error message, the variable This pull request presumably fixes the issue on Linux/mips64el. However, it breaks the build with GCC 14 on Linux/x86_64: In order to build on every platform, the type of the variable should be exactly what is written in the prototype of
A general solution would probably require conditional compilation, maybe checking both |
No description provided.